<template>
  <div id="app">
    <div class="member-bj">
      <van-cell :border="false" size="large"  is-link title-class="custom-title1" value-class="member-values">
        <template #title>
          <span class="custom-title ">{{info.nickname}}</span>
        </template>
        <template #label>
            <van-tag type="primary" size="large" color="#ffbf5c" round>ViP：<span v-if="info.vip == 1" @click="$router.push('/SmrzMemberkt')">未开通</span> <span v-if="info.vip == 2" @click="$router.push('/SmrzMemberkt')" >已开通</span> </van-tag>
        </template>
        <template #icon>
          <img :src="info.headimgurl" alt="" class="left-img left-img-size">
        </template>
        <template #default>

          <span v-if="info.rzzt == 0" @click="$router.push('/Smrz')" >未实名</span>
          <span v-if="info.rzzt == 1" @click="$router.push('/Smrz')">已实名</span>
        </template>
      </van-cell>
    </div>
    <!-- <van-image width="100%"  height="60" src="../../static/image/member1.jpg" class="gqimg"  @click="tiao" /> -->
    <div  class="gqimg" >
      <img width="100%" class="van-image__img" height="60px" src="../../static/image/member1.jpg" @click="tiao">
    </div>
    <div class="pad-w">
      <van-cell-group inset>
        <van-cell title="实名认证" icon="certificate" is-link  to="/Smrz" />
        <van-cell title="个人资料" icon="contact" is-link to="/Memberinfo"/>
        <van-cell title="会员权益" icon="shop-o" is-link to="/About?id=16"/>
        <van-cell title="我的消息" icon="envelop-o" is-link to="/Message"/>
        <van-cell title="咨询客服" icon="phone-o" @click="callPhone" is-link :value="data.kftel"/>
      </van-cell-group>
    </div>
  </div>
</template>
<style >
  body{background: #F7F7F7;}
</style>
<script>
export default {
  data () {
    return {
      info:[],
      data:[],
    }
  },
  components: {
  },
  created:function () {
      this.$emit('footer', true);
  },


  mounted () {
    this.id = this.$route.query.id;
    this.recordapi();
  },
  	methods: {
      tiao(){
        console.log(1);
         this.$router.push('Memberkt')
      },
      callPhone(){
        window.location.href = 'tel://'+this.data.kftel
      },
      recordapi(){
          var that = this;
          var userid = that.$cookieStore.getCookie('userid');
          console.log(userid);
          that.$api.post("/Index/member",{'id':userid}).then(res => {
            console.log(res);
             console.log(userid);
            that.info = res.info;
            that.data = res.data;
          });
      },
    }
}
</script>
